<html>
<head>
<title>House Finder</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript">
    function calculate() {
        var incomeTxt = $("#income").val();
        var roomTxt = $("#room").val();

        if (incomeTxt != "" && roomTxt != "") {
            incomeYear = 12 * incomeTxt;
            housePrice = roomTxt * 5000;

            if (incomeYear > housePrice) {
                alert('Congrats, for your new house.');
            }
            else {
                alert('Please decrease your room.');
            }
        }
        else {
            alert('Please complete your data');
        }
    }

    $(document).ready(function() {
        $("#btn").click(function() {
            calculate();
        });
    });

</script>
</head>
<body>
    <h1>Ready to find a new house ?</h1>
    
    <div class="label">Enter your annual income :</div>
    <div class="input"><input type="text" id="income" /></div>
    
    <div class="separator"></div>
    
    <div class="label">Enter the number of bedrooms :</div>
    <div class="input"><input type="text" id="room" /></div>
    
    <div class="separator"></div>
    
    <div><input type="button" id="btn" value="Calculate Price" /></div>
</body>
</html>